<div class="grid-list page-content ">
	<form nz-form [formGroup]="validateForm" class="page-header">
		<div nz-row [nzGutter]="24">
			<div nz-col [nzSpan]="6">
				<nz-form-item>
					<nz-form-label nzFor="roleName">角色名称</nz-form-label>
					<nz-form-control>
						<input nz-input placeholder="请填写" formControlName="roleName" />
					</nz-form-control>
				</nz-form-item>
			</div>
			
			<div nz-col [nzSpan]="6" [nzOffset]="12">
				<nz-form-item style="float: right;">
					<button *ngIf="authList.includes(authEnum.SYSTEM_ROLE_VIEW)" nz-button [nzLoading]="nzLoading" style="margin-right: 10px;" (click)="onSearch(true)">
						<i nz-icon nzType="search"></i>
						搜索
					</button>
					<button *ngIf="authList.includes(authEnum.SYSTEM_ROLE_ADD)" nz-button nzType="primary"  (click)="add()">
						<i nz-icon nzType="plus"></i>
						新增
					</button>
				</nz-form-item>
			</div>
			
		</div>

	</form>


	<nz-table #basicTable [nzData]="data" [nzBordered]="true" [nzShowPagination]="false" nzSize="middle"
		[nzScroll]="{y:  'calc(100vh - 190px'}" [nzLoading]="nzLoading" [nzPageSize]="page.limit">
		<thead>
			<tr>
				<th nzAlign="center" nzWidth="60px">序号</th>
				<th nzAlign="center" nzWidth="auto">角色名称</th>
				<th nzAlign="center" nzWidth="200px">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr *ngFor="let item of basicTable.data; let i = index;">
				<td nzAlign="center">{{ i + 1}}</td>
				<td nzAlign="center">
					{{item.roleName}}
				</td>
				<td nzAlign="center">
					<ng-container *ngIf="authList.includes(authEnum.SYSTEM_ROLE_EDIT)">
						<a (click)="add(item)">编辑</a>
					</ng-container>

					<nz-divider *ngIf="authList.includes(authEnum.SYSTEM_ROLE_EDIT) && authList.includes(authEnum.SYSTEM_ROLE_DEL)" nzType="vertical"></nz-divider>
					<ng-container *ngIf="authList.includes(authEnum.SYSTEM_ROLE_DEL)">
						<a nz-popconfirm nzPopconfirmTitle="确定删除吗?" (nzOnConfirm)="del(item)">删除</a>
					</ng-container>

				</td>
			</tr>
		</tbody>
	</nz-table>

	<div class="page-pagination">
		<span *ngIf="data?.length">共{{data?.length}}条数据</span>
		<!-- <nz-pagination [(nzPageIndex)]="page.page" [nzTotal]="page.total" nzShowQuickJumper nzShowSizeChanger
			[(nzPageSize)]="page.limit" (nzPageIndexChange)="pageChange()" (nzPageSizeChange)="pageChange()">
		</nz-pagination> -->
	</div>

</div>